#!/usr/bin/env python

import asyncio
from websockets.server import serve

nums = 1


async def echo(websocket):
    while True:
        num = 1
        await websocket.send(f"{num}")
        await asyncio.sleep(3)


async def main():
    async with serve(echo, "localhost", 8765):
        await asyncio.Future()  # run forever


asyncio.run(main())
